error
Create a validation result with this if there was a problem during validation.
In this case, typically, storedVal will be the default value associated with this validation. A valid instance of T must always be passed back. Add a descriptive error message to errorContext. If there is no default, you will want to make your result type nullable and pass back null
Return
the errored ValidationResult
Author
fzzyhmstrs
Since
0.7.0
Parameters
Type of result
default or fallback instance of type T
ErrorEntry the error to pass with this result
Create a validation result with this if there was a problem during validation.
If storing a simple string error message, consider the overload that accepts a ErrorEntry.Type
In this case, typically, storedVal will be the default value associated with this validation. A valid instance of T must always be passed back. Add a descriptive error message to errorContext. If there is no default, you will want to make your result type nullable and pass back null
Return
the errored ValidationResult
Author
fzzyhmstrs
Since
0.7.0
Parameters
Type of result
Type of error content to store. This is usually a string message
default or fallback instance of type T
ErrorEntry.Type<C> the error type. When in doubt, use Errors.BASIC
UnaryOperator<ErrorEntry.Builder> operator for applying content to a provided error builder
Create a validation result with this if there was a problem during validation.
In this case, typically, storedVal will be the default value associated with this validation. A valid instance of T must always be passed back. Add a descriptive error message to errorContext. If there is no default, you will want to make your result type nullable and pass back null
Return
the errored ValidationResult
Author
fzzyhmstrs
Since
0.7.0
Parameters
Type of result
default or fallback instance of type T
ErrorEntry.Type
string with error message
Throwable, optional, default null. Exception to pass if this result is critically errored
Deprecated
Plain error strings are deprecated but acceptable. Most of the time passing in ErrorContext is preferred
Create a validation result with this if there was a problem during validation.
In this case, typically, storedVal will be the default value associated with this validation. A valid instance of T must always be passed back. Add a descriptive error message to error. If there is no default, you will want to make your result type nullable and pass back null
Return
the errored ValidationResult
Author
fzzyhmstrs
Since
0.1.0, deprecated 0.7.0
Parameters
Type of result
default or fallback instance of type T
string with error message